﻿package mortal.game.view.copy.crossMainCity.panels.sub
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import extend.language.*;
    import flash.text.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.item.*;

    public class MainCityRankRender extends NoSkinCellRenderer
    {
        private var _txtRank:GTextFiled;
        private var _txtGuildName:GTextFiled;
        private var _txtPlayerName:GTextFiled;
        private var _txtCareer:GTextFiled;
        private var _txtCombat:GTextFiled;
        private var _txtKill:GTextFiled;
        private var _txtAssist:GTextFiled;
        private var _txtBeKilled:GTextFiled;
        private var _txtScore:GTextFiled;
        private var _line:ScaleBitmap;
        private var _myData:MainCityBattlePlayerRankData;

        public function MainCityRankRender()
        {
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this._myData = param1 as MainCityBattlePlayerRankData;
            if (this._myData == null)
            {
                return;
            }
            this._txtRank.text = this._myData.rank.toString();
            this._txtGuildName.text = this._myData.guildName;
            this._txtPlayerName.text = this._myData.playerName;
            this._txtCareer.text = GameDefConfig.instance.getCarrer(this._myData.career);
            this._txtCombat.text = this._myData.combat.toString();
            this._txtKill.text = this._myData.killNum.toString();
            this._txtAssist.text = this._myData.assistNum.toString();
            this._txtBeKilled.text = this._myData.beKilledNum.toString();
            this._txtScore.text = this._myData.score.toString();
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatBai;
            _loc_1.align = TextFormatAlign.CENTER;
            this._txtRank = UIFactory.gTextField("1", -18, 6, 100, 22, this, _loc_1);
            this._txtGuildName = UIFactory.gTextField(Language.getString(20943), 74, 6, 100, 22, this, _loc_1.clone());
            this._txtPlayerName = UIFactory.gTextField(Language.getString(20944), 182, 6, 100, 22, this, _loc_1.clone());
            this._txtCareer = UIFactory.gTextField(Language.getString(20945), 300, 6, 100, 22, this, _loc_1.clone());
            this._txtCareer.textColor = GlobalStyle.colorHuang2Uint;
            this._txtCombat = UIFactory.gTextField("1111122", 383, 6, 100, 22, this, _loc_1.clone());
            this._txtKill = UIFactory.gTextField("8000", 465, 6, 100, 22, this, _loc_1.clone());
            this._txtAssist = UIFactory.gTextField("521", 547, 6, 100, 22, this, _loc_1.clone());
            this._txtBeKilled = UIFactory.gTextField("3878", 618, 6, 100, 22, this, _loc_1.clone());
            this._txtScore = UIFactory.gTextField("45211", 691, 6, 100, 22, this, _loc_1.clone());
            this._txtScore.textColor = 65280;
            this._line = UIFactory.bg(0, 28, 790, 2, this, ImagesConst.SplitLine);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._txtRank.dispose(param1);
            this._txtRank = null;
            this._txtGuildName.dispose(param1);
            this._txtGuildName = null;
            this._txtPlayerName.dispose(param1);
            this._txtPlayerName = null;
            this._txtCareer.dispose(param1);
            this._txtCareer = null;
            this._txtCombat.dispose(param1);
            this._txtCombat = null;
            this._txtKill.dispose(param1);
            this._txtKill = null;
            this._txtAssist.dispose(param1);
            this._txtAssist = null;
            this._txtBeKilled.dispose(param1);
            this._txtBeKilled = null;
            this._txtScore.dispose(param1);
            this._txtScore = null;
            this._line.dispose(param1);
            this._line = null;
            return;
        }// end function

    }
}
